home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_13_1986_Transactor_Publishing.d64 / address finder (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  930b  |  37 lines

  1. 20 print"this program will give the start"
  2. 30 print"and end address of a program"
  3. 50 input"what is the filename";f$
  4. 60 open2,8,2,f$+",p,r"
  5. 70 get#2,lo$: lo$=lo$+chr$(0)
  6. 80 get#2,hi$: hi$=hi$+chr$(0)
  7. 90 close2 :la=asc(lo$)+256*asc(hi$)
  8. 100 print"[147]working"
  9. 110 poke198,2:poke631,13:poke632,13:
  10. 115 oc=peek(646): rem save old chr colr
  11. 120 print"":poke646,peek(53281)and15
  12. 130 print"goto160":print""
  13. 140 print"verify";chr$(34);f$;chr$(34);",8,1[145][145][145][145][145]"
  14. 150 poke198,3:poke631,13:poke632,13:poke633,13:end
  15. 160 ea=peek(174)+256*peek(175)-1
  16. 170 poke 646,oc: rem restore char color
  17. 180 print""f$:print"[146]":print""
  18. 190 h$="0123456789abcdef"
  19. 200 x=la
  20. 210 fori=3to0step-1
  21. 220 n%=x/(16^i):x=x-n%*16^i
  22. 230 he$=he$+mid$(h$,n%+1,1)
  23. 240 next
  24. 250 p$="0123456789abcdef"
  25. 260 z=ea
  26. 270 fori=3to0step-1
  27. 280 n%=z/(16^i):z=z-n%*16^i
  28. 290 pe$=pe$+mid$(p$,n%+1,1)
  29. 300 next
  30. 310 print" start address :"la;"dec.   ";he$;" hex"
  31. 320 print" end address   :"ea;"dec.   ";pe$;" hex"
  32. 330 clr
  33. 340 print"another file?  y/n"
  34. 350 geta$:ifa$=""then350
  35. 360 if a$="y"then50
  36. 370 end
  37.